﻿<%@ Page Language="C#" MasterPageFile="~/Front.Master" AutoEventWireup="true" CodeBehind="ManageTask2.aspx.cs" Inherits="HRProject.User.ManageTask2" Title="Untitled Page" %>
<asp:Content ID="IncludePlaceHolder" ContentPlaceHolderID="IncludePlaceHolder" runat="server">
    <link href="/css/tree.css" rel="stylesheet" type="text/css"/>
    <link href="/css/jsDatePick_ltr.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" language="javascript" src="/js/jsDatePick.min.1.3.js"></script>
    <script type="text/javascript" language="javascript" src="/js/tree.js"></script>
    <script type="text/javascript" src="/js/task.js"></script>
    <script type="text/javascript">
	function init(){
	    url = window.location.href;
		new JsDatePick({
			useMode:2,
			target:"<%= tbxEstimateStartFrom.ClientID %>",
			dateFormat:"%d/%m/%Y"
		});
		new JsDatePick({
			useMode:2,
			target:"<%= tbxEstimateStartTo.ClientID %>",
			dateFormat:"%d/%m/%Y"
		});
		new JsDatePick({
			useMode:2,
			target:"<%= tbxEstimateFinishFrom.ClientID %>",
			dateFormat:"%d/%m/%Y"
		});
		new JsDatePick({
			useMode:2,
			target:"<%= tbxEstimateFinishTo.ClientID %>",
			dateFormat:"%d/%m/%Y"
		});
		new JsDatePick({
			useMode:2,
			target:"<%= tbxRealStartFrom.ClientID %>",
			dateFormat:"%d/%m/%Y"
		});
		new JsDatePick({
			useMode:2,
			target:"<%= tbxRealStartTo.ClientID %>",
			dateFormat:"%d/%m/%Y"
		});
		new JsDatePick({
			useMode:2,
			target:"<%= tbxRealFinishFrom.ClientID %>",
			dateFormat:"%d/%m/%Y"
		});
		new JsDatePick({
			useMode:2,
			target:"<%= tbxRealFinishTo.ClientID %>",
			dateFormat:"%d/%m/%Y"
		});
	};
	</script>
</asp:Content>
<asp:Content ID="TitleIconPlaceHolder" ContentPlaceHolderID="TitleIconPlaceHolder" runat="server">
    <img alt="" src="/image/layout/icon/UserIcon.png" />
</asp:Content>
<asp:Content ID="TitleNamePlaceHolder" ContentPlaceHolderID="TitleNamePlaceHolder" runat="server">
    Manage Tasks      
</asp:Content>
<asp:Content ID="MainPanelPlaceHolder" ContentPlaceHolderID="MainPanelPlaceHolder" runat="server">

        <div class="table-row-label">Department</div>
        <div class="table-row-content">
            <asp:DropDownList ID="ddlDepartment" runat="server" DataTextField="Name" 
                DataValueField="Id" onselectedindexchanged="ddlDepartment_SelectedIndexChanged" AutoPostBack="True"
                Width="200">
            </asp:DropDownList>
        </div>
        <div class="table-row-label">Role</div>
        <div class="table-row-content">
            <asp:DropDownList ID="ddlRole" runat="server" DataTextField="Name" 
                DataValueField="Id" onselectedindexchanged="ddlRole_SelectedIndexChanged" AutoPostBack="True"
                Width="200">
            </asp:DropDownList>
        </div>
        <div class="table-row-label">Agent</div>
        <div class="table-row-content">
            <asp:DropDownList ID="ddlUser" runat="server" DataTextField="UserName" 
                DataValueField="Id" AutoPostBack="True"
                Width="200" onselectedindexchanged="ddlUser_SelectedIndexChanged">
            </asp:DropDownList>
        </div>
        <div class="table-row-label">
            <asp:CheckBox ID="cbxEstimateStart" runat="server" Text="Estimate start time"/>
        </div>
        <div class="table-row-content">
            <asp:TextBox ID="tbxEstimateStartFrom" runat="server"></asp:TextBox>
            <asp:TextBox ID="tbxEstimateStartTo" runat="server"></asp:TextBox>
        </div>
        <div class="table-row-label">
            <asp:CheckBox ID="cbxEstimateFinish" runat="server" Text="Estimate finish time"/>
        </div>
        <div class="table-row-content">
            <asp:TextBox ID="tbxEstimateFinishFrom" runat="server"></asp:TextBox>
            <asp:TextBox ID="tbxEstimateFinishTo" runat="server"></asp:TextBox>
        </div>
        <div class="table-row-label">
            <asp:CheckBox ID="cbxRealStart" runat="server" Text="Real start time"/>
        </div>
        <div class="table-row-content">
            <asp:TextBox ID="tbxRealStartFrom" runat="server"></asp:TextBox>
            <asp:TextBox ID="tbxRealStartTo" runat="server"></asp:TextBox>
        </div>
        <div class="table-row-label">
            <asp:CheckBox ID="cbxRealFinish" runat="server" Text="Real finish time"/>
        </div>
        <div class="table-row-content">
            <asp:TextBox ID="tbxRealFinishFrom" runat="server"></asp:TextBox>
            <asp:TextBox ID="tbxRealFinishTo" runat="server"></asp:TextBox>
        </div>
        <div class="table-row-label"></div>
        <div class="table-row-content">
            <asp:Button ID="btnSearch" runat="server" Text="Search" onclick="Search_Click" />
        </div>
        <div class="table-row-label">Tasks</div>
        <div class="table-row-content">
            <asp:GridView ID="dgvTasks" runat="server" AutoGenerateColumns="False" 
                AllowPaging="True" onpageindexchanging="dgvTasks_PageIndexChanging">
                <RowStyle Font-Size="Small" />
                <EmptyDataRowStyle BorderWidth="0px" ForeColor="#727272" />
                <Columns>
                    <asp:BoundField DataField="Id" ShowHeader="False" Visible="False" />
                    <asp:BoundField DataField="Name" HeaderText="Task" >
                    </asp:BoundField>
                    <asp:BoundField DataField="HtmlEstimateStartDate" 
                        HeaderText="Estimate start time"  DataFormatString="{0:u}">
                    </asp:BoundField>
                    <asp:BoundField DataField="HtmlEstimateFinishDate" DataFormatString="{0:u}"
                        HeaderText="Estimate finish time" >
                    </asp:BoundField>
                    <asp:BoundField DataField="HtmlRealStartDate" HeaderText="Real start time" />
                    <asp:BoundField DataField="HtmlRealFinishDate" HeaderText="Real finish time" />
                    <asp:BoundField DataField="InChargeUserName" HeaderText="In charged user" 
                        HtmlEncode="False" />
                    <asp:BoundField DataField="ActionBar" HtmlEncode="False" ShowHeader="False" />
                </Columns>
            </asp:GridView>
        </div>
        <br />

</asp:Content>
